import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("mall_footprint",{schema:"nest-mall" } )
@Index("index_mall_footprint_user_id_goods_id",["userId","goodsId",])
export class MallFootprint {

    @PrimaryGeneratedColumn({
        type:"int", 
        name:"id"
        })
    id:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"user_id"
        })
    userId:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"goods_id"
        })
    goodsId:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"add_time"
        })
    addTime:number;
        

    @Column("int",{ 
        nullable:true,
        name:"referrer"
        })
    referrer:number | null;
        
}
